package kgc.crm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
    * 合同表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "kgc_crm_crm_contract")
public class Contract {
    @TableId(value = "contract_id", type = IdType.AUTO)
    private Integer contractId;

    /**
     * 合同名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 客户ID
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 商机ID
     */
    @TableField(value = "business_id")
    private Integer businessId;

    /**
     * 0 未审核 1 审核通过 2 审核拒绝 3 审核中 4 已撤回 5草稿 6 作废
     */
    @TableField(value = "check_status")
    private Integer checkStatus;

    /**
     * 审核记录ID
     */
    @TableField(value = "examine_record_id")
    private Integer examineRecordId;

    /**
     * 下单日期
     */
    @TableField(value = "order_date")
    private Date orderDate;

    /**
     * 创建人ID
     */
    @TableField(value = "create_user_id")
    private Long createUserId;

    /**
     * 负责人ID
     */
    @TableField(value = "owner_user_id")
    private Long ownerUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 合同编号
     */
    @TableField(value = "num")
    private String num;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * 合同金额
     */
    @TableField(value = "money")
    private BigDecimal money;

    /**
     * 整单折扣
     */
    @TableField(value = "discount_rate")
    private BigDecimal discountRate;

    /**
     * 产品总金额
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 合同类型
     */
    @TableField(value = "types")
    private String types;

    /**
     * 付款方式
     */
    @TableField(value = "payment_type")
    private String paymentType;

    /**
     * 批次 比如附件批次
     */
    @TableField(value = "batch_id")
    private String batchId;

    /**
     * 只读权限
     */
    @TableField(value = "ro_user_id")
    private String roUserId;

    /**
     * 读写权限
     */
    @TableField(value = "rw_user_id")
    private String rwUserId;

    /**
     * 客户签约人（联系人id）
     */
    @TableField(value = "contacts_id")
    private Integer contactsId;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 公司签约人
     */
    @TableField(value = "company_user_id")
    private Integer companyUserId;

    public static final String COL_CONTRACT_ID = "contract_id";

    public static final String COL_NAME = "name";

    public static final String COL_CUSTOMER_ID = "customer_id";

    public static final String COL_BUSINESS_ID = "business_id";

    public static final String COL_CHECK_STATUS = "check_status";

    public static final String COL_EXAMINE_RECORD_ID = "examine_record_id";

    public static final String COL_ORDER_DATE = "order_date";

    public static final String COL_CREATE_USER_ID = "create_user_id";

    public static final String COL_OWNER_USER_ID = "owner_user_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_NUM = "num";

    public static final String COL_START_TIME = "start_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_MONEY = "money";

    public static final String COL_DISCOUNT_RATE = "discount_rate";

    public static final String COL_TOTAL_PRICE = "total_price";

    public static final String COL_TYPES = "types";

    public static final String COL_PAYMENT_TYPE = "payment_type";

    public static final String COL_BATCH_ID = "batch_id";

    public static final String COL_RO_USER_ID = "ro_user_id";

    public static final String COL_RW_USER_ID = "rw_user_id";

    public static final String COL_CONTACTS_ID = "contacts_id";

    public static final String COL_REMARK = "remark";

    public static final String COL_COMPANY_USER_ID = "company_user_id";
}